<script>
import {
  create,
} from '@/api/' //  此处请自行替换地址
import infoList from '@/mixins/infoList'
{{- $length := len . }}
export default {
  mixins: [infoList],
  data() {
    return {
      type: '',
      formData: {
    {{- range $index, $el := .}}
      {{- if eq $el.FieldType "bool" }}
      {{- if eq $index (sub $length 1) }}
        {{$el.FieldJson}}: false
      {{- else }}
        {{$el.FieldJson}}: false,
      {{- end }}
      {{- end }}
      {{- if eq $el.FieldType "string" }}
      {{- if eq $index (sub $length 1) }}
        {{$el.FieldJson}}: ''
      {{- else }}
        {{$el.FieldJson}}: '',
      {{- end }}
      {{- end }}
      {{- if eq $el.FieldType "int" }}
      {{- if eq $index (sub $length 1) }}
        {{$el.FieldJson}}: 0
      {{- else }}
        {{$el.FieldJson}}: 0,
      {{- end }}
      {{- end }}
      {{- if eq $el.FieldType "time.Time" }}
      {{- if eq $index (sub $length 1) }}
        {{$el.FieldJson}}: new Date()
      {{- else }}
        {{$el.FieldJson}}: new Date(),
      {{- end }}
      {{- end }}
      {{- if eq $el.FieldType "float64" }}
      {{- if eq $index (sub $length 1) }}
        {{$el.FieldJson}}: 0
      {{- else }}
        {{$el.FieldJson}}: 0,
      {{- end }}
      {{- end }}
    {{- end }}
      }
    }
  }
}
</script>